<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
<!--
$("#filetype").validate({
	  rules:{
		  ddtypeName:{
			  required:true,
			 
		  }
	  },messages:{
		  ddtypeName:{
			  required:"必填",
			  
		  }
	  },
		errorPlacement: function(error, element) {                             //错误信息位置设置方法  
			 error.appendTo( element.next("span") );                            //这里的element是录入数据的对象  
		 },
		 errorElement:"span" 
 });
//-->
</script>

<c:if test="${success==true }">
   <div class="ts" style='height:40px;padding:1px;width:90%;'>
	  <div style='margin-top:15px;'><p align="center" style='color:'>添加成功</p></div>
	</div>
</c:if>
<c:if test="${success==false }">
   <div class="ts" style='height:40px;padding:1px;width:90%;'>
	  <div style='margin-top:15px;'><p align="center" style='color:'>添加失败</p></div>
	</div>
</c:if>

<div>
	<table style="width: 100%" class="table table-hover ">
	          <c:choose>
					<c:when test="${empty majors }">
						<tr>
							<td colspan="3" style="color: red" align="center">暂时没有专业信息</a></td>
						</tr>
					</c:when>
					<c:when test="${not empty majors}">
					    <tr>
					       <td style='' class='content_td1'>标题</td>
					      
					       <td  class='content_td3'>操作</td>
					    </tr>
						<c:forEach items="${majors }" var="news" varStatus="status">
							<tr class='discuss'>
								<td class="content_td1 ">
								    <div class='newsTitle1'><a
									title='${news.name}'>
									<span >${news.name}</span>
									</a></div>
								</td> 
								<td class="content_td3"><a href='#'><button te='${news.id }' style='width:80px;' url='delmajor' backurl='zymgui' class='del btn btn-danger'>删除</button></a>
								  |	<a href='<%=basePath %>backend/updatezy/${news.id }' style='width:80px;' class="update btn btn-warning"  >
                                                                                          修改
                                   </a>
                                   <!-- Modal -->
                           
								</td>
						</c:forEach>
						
					</c:when>
				</c:choose>
				</table>
</div>